
//3185.构成整天的下标对数目II
class Solution {
public:
    long long countCompleteDayPairs(vector<int>& hours) {
        int n=hours.size();
        int m[24]={0};

        long long ret=0;
        for(int i=0;i<n;i++)
        {
            int need=(24-hours[i]%24)%24;
            ret+=m[need];

            m[hours[i]%24]++;
        }
        return ret;
    }
};